<%@page import="java.util.List"%>
<%@page import="com.gkwave.module.bean.User"%>
<%@page import="java.util.Iterator"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>::CreateUserPage::</title>
<script type="text/javascript">
	function _validate(){
		var uname = document.forms["_form_create_user"]._user_name.value();
		var upwd = document.forms["_form_create_user"]._password.value();
		var fname = document.forms["_form_create_user"]._user_full_name.value();
		alert(uname + ", " + upwd +", "+ fname);
	}
</script>
</head>
<body>
<form action="userCreationPage" method="post" name="_form_create_user">

	<%
		if(request.getAttribute("message")!=null){
	 %>
	<table width="100%">
		<tr>
			<td><%= request.getAttribute("message")%></td>
		</tr>
	</table>
	<% 
		}
	%>
		<table cellpadding="1">
		<tr>
			<td valign="top">
				<table border="1">
					<tr>
						<td>User Name</td>	
						<td>LoginID</td>
						<td>Password</td>
						<td>Email</td>
						<td>Status</td>
					</tr>				
					<% 
						List<User> list = (List)request.getAttribute("user");
						if(list!=null){
						Iterator ite = list.iterator();
						while(ite.hasNext()){
						User user = (User)ite.next();
						String name = user.getFirstName();
						String loginid = user.getIdLogin();
						String password = user.getPassword();
						String email = user.getIdEmail();
						String inActive = user.getInActive();
					%>
						<tr>
							<td><%=name %></td>	
							<td><%=loginid %></td>
							<td><%=password %></td>
							<td><%=email%></td>
							<td><%=inActive %></td>
						</tr>					
					<%	
							}
						}
					%>
				</table>			
			</td>
			
			<td valign="top">
				<table>
					<tr>
						<td>User ID</td><td><input type="text" name="_user_name"></td>
					</tr>
					<tr>	
						<td>Password</td><td><input type="text" name="_password"></td>
					</tr>
					<tr>	
						<td>User Full name</td><td><input type="text" name="_user_full_name"></td>
					</tr>
					<tr>	
						<td>Email ID</td><td><input type="text" name="_user_id_email"></td>
					</tr>
					<tr>
						<td><input type="submit" onclick="" value="Save"></td><td><input type="reset" value="Reset"></td>
					</tr>
				</table>			
			</td>			
		</tr>		
	</table>
</form>
</body>
</html>